SwappableImage.this

Constructs a swappable image using a specific image storage type as its value.

If the image storage type does not support ImageStorageOffset it will add support.
If the color type specified is not the same type for the image storage instance then it'll auto convert. It is the responsiblity of the user to check for precision gain/lost.
Supports deallocating of the image provided, using the allocator, when the destructor is called. If the allocator is not provided it will not deallocate it.

  1. this()
  2. this(size_t width, size_t height, IAllocator alloc)
  3. this(T from, IAllocator allocator)
    struct SwappableImage(Color)
    @nogc @trusted
    this
    (
    T
    )
    (,
    IAllocator allocator = null
    )
    if (
    (
    (
    !isPointer!T &&
    )
    ||
    (
    isPointer!T &&
    isImage!(PointerTarget!T)
    )
    )
    &&
    isUnsigned!(ImageIndexType!T)
    &&
    (ImageIndexType!T).sizeof <= (void*).sizeof
    )
    if (
    isColor!Color
    )

Parameters

allocator IAllocator

Allocator to deallocate the image if provided when destructor is called

See Also

ImageStorage, ImageStorageOffset

Meta